package com.dqyt.khjc.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 	将磁盘文件路径映射为项目访问路径
 * 
 * @author 王植平
 * @version 1.0
 * @date 创建时间：2019年8月29日 下午11:28:36
 * @parameter
 * @since
 * @return
 *
 */
@Configuration
public class WebMvcConfiguration implements WebMvcConfigurer {
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler(Config.WEB_STATICACCESSPATH)
				.addResourceLocations("file:" + Config.UPLOADFOLDER + "/");
		registry.addResourceHandler(Config.WEB_STATICACCESSPATH)
		.addResourceLocations("file:" + Config.UPLOADFOLDER + "/");
	}
}
